package com.hks.quart.task;

import com.hks.common.core.util.OkHttpUtils;
import com.hks.quart.entity.ScheduleJobBean;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

@Component("selectForOracleToMysql")
public class ycfinancial_flow implements TaskService {

    private static final Logger LOG = LoggerFactory.getLogger(ycfinancial_flow.class.getName()) ;

    private static final SimpleDateFormat format =
            new SimpleDateFormat("yyyy-MM-dd HH:mm:ss") ;

    @Override
    public String  run(ScheduleJobBean jobBean) {
        Map<String,String> map = new HashMap<>();
        String result = OkHttpUtils.getInstance().get("http://10.98.2.2:9007/ncFlow/selectForOracleToMysql",map);
        LOG.info("result === >> " + result);
        LOG.info("当前时间::::"+format.format(new Date()));
        return result;
    }
}
